package com.lwt.hospital.config;

import com.lwt.hospital.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 丁兆顺
 * @date 2020/5/18 10:37
 * @desciption
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor()).excludePathPatterns("/login.html",
                "/css/**","/js/**","/img/**","/register.html","/login","/register","/index.html","/ifLogin");
    }

}
